var people = document.getElementsByClassName('people')[0].getElementsByTagName('li'),
    disease = document.getElementsByClassName('disease'),
    people_list = ["全部","男人","女人","老人","儿童"];
getDiseasePeople();
(function changeTab(tab) {
    for(var i = 0, len = people.length; i < len; i++) {
        people[i].onmousedown = showLi;
    }
})();

function showLi() {
    for(var i = 0, len = people.length; i < len; i++) {
      if(people[i] === this) {
          people[i].className = 'selected';
          removeDiseasePeople();
          document.getElementById("people-name").innerHTML = people_list[i] + "相关的疾病";
          getDiseasePeople();
      } else {
          people[i].className = '';
      }
    }
}
function getDiseasePeople() {
       var disease = [{
          "疾病":"泛细支气管炎",
          "科室":"内科",
          "简介":"弥漫性泛细支气管炎(diffusepanbronchiolitis ,DPB)是一种弥漫存\
          在于两肺呼吸性细支气管的气道慢性炎症性疾病。受累部位主要是呼吸性细支气管\
          以远的终末气道。由于炎症病变弥漫性地分布并累及呼吸性细支气管壁的全层,故\
          称之为啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊啊\
          啊啊啊啊啊啊啊啊啊啊啊",
          "症状":['呼吸困难', '活动后气促', '咳嗽', '咳痰', '老人剧烈咳嗽']
        }];
     addDisease(disease);
 }
 function removeDiseasePeople(){
     var big_box = document.getElementById("disease");
     big_box.innerHTML = "<div class=\"row my-bar-box\">\
       <p style=\"float:left\" name=\"people-name\"; id=\"people-name\"></p>\
     </div>"
 }
